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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.y: E = None
        self.s: C = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.w: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.y: E = None
        self.s: C = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.w: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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