class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.p: G = None
        self.w: H = None
        self.u: B = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.t: F = None
        self.z: F = None
        self.s: G = None
        self.q: A = None
        self.txt = txt

i = A("i")
e = B("e")
h = C("h")
k = D("k")
f = E("f")
j = F("j")
c = G("c")
l = H("l")

i.x = e
e.z = c
h.w = c
h.r = f
h.x = j
h.v = i
k.v = c
k.p = c
k.o = h
k.w = l
k.u = e
k.x = e
k.q = i
f.u = c
j.u = c
j.t = k
j.r = f
j.x = h
c.t = k
l.u = i
l.q = i
l.r = c
l.s = c
l.t = j
l.z = j
assert h.w.t.v.t.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.p: G = None
        self.w: H = None
        self.u: B = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.t: F = None
        self.z: F = None
        self.s: G = None
        self.q: A = None
        self.txt = txt

i = A("i")
e = B("e")
h = C("h")
k = D("k")
f = E("f")
j = F("j")
c = G("c")
l = H("l")

i.x = e
e.z = c
h.w = c
h.r = f
h.x = j
h.v = i
k.v = c
k.p = c
k.o = h
k.w = l
k.u = e
k.x = e
k.q = i
f.u = c
j.u = c
j.t = k
j.r = f
j.x = h
c.t = k
l.u = i
l.q = i
l.r = c
l.s = c
l.t = j
l.z = j
assert h.w.t.v.t.o.r.txt == "f"