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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.w: C = None
        self.o: C = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.w: C = None
        self.o: C = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

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

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