class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: F = None
        self.s: F = None
        self.o: E = None
        self.q: B = None
        self.z: E = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.r: H = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.y: H = None
        self.v: F = None
        self.u: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

n = A("n")
f = B("f")
a = C("a")
c = D("c")
i = E("i")
l = F("l")
k = G("k")
g = H("g")

n.o = g
f.s = i
f.t = g
a.p = i
a.o = i
a.z = i
a.y = i
a.v = l
a.s = l
a.q = f
a.r = g
c.v = i
c.p = l
c.u = f
i.v = f
i.z = l
i.r = k
l.w = n
l.t = f
l.r = g
l.q = i
l.x = c
k.o = g
k.y = g
k.u = g
k.t = a
k.z = a
k.v = l
k.w = n
g.w = i
g.p = i
g.t = l
assert n.o.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: F = None
        self.s: F = None
        self.o: E = None
        self.q: B = None
        self.z: E = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.r: H = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.y: H = None
        self.v: F = None
        self.u: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

n = A("n")
f = B("f")
a = C("a")
c = D("c")
i = E("i")
l = F("l")
k = G("k")
g = H("g")

n.o = g
f.s = i
f.t = g
a.p = i
a.o = i
a.z = i
a.y = i
a.v = l
a.s = l
a.q = f
a.r = g
c.v = i
c.p = l
c.u = f
i.v = f
i.z = l
i.r = k
l.w = n
l.t = f
l.r = g
l.q = i
l.x = c
k.o = g
k.y = g
k.u = g
k.t = a
k.z = a
k.v = l
k.w = n
g.w = i
g.p = i
g.t = l
assert n.o.w.v.txt == "f"