class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: H = None
        self.w: G = None
        self.x: G = None
        self.t: H = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.w: E = None
        self.z: A = None
        self.x: D = None
        self.t: C = None
        self.s: B = None
        self.p: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: H = None
        self.w: G = None
        self.x: G = None
        self.t: H = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.w: E = None
        self.z: A = None
        self.x: D = None
        self.t: C = None
        self.s: B = None
        self.p: H = None
        self.txt = txt

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

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

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