class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: E = None
        self.q: F = None
        self.p: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.x: B = None
        self.z: E = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: G = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: E = None
        self.q: F = None
        self.p: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.x: B = None
        self.z: E = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: G = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

b.x = j
b.w = j
b.z = c
a.q = h
e.v = k
e.z = h
e.u = l
e.p = l
e.q = d
e.s = j
h.y = e
h.p = e
h.t = c
h.x = a
h.z = l
h.o = b
l.v = j
l.z = j
l.t = f
d.u = f
f.u = a
j.y = l
k.u = f
c.x = j
c.w = j
c.z = b
assert b.x.y.v.y.z.y.z.y.t.txt == "f"