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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.t: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.t: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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