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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: F = None
        self.q: F = None
        self.p: E = None
        self.t: D = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: F = None
        self.q: F = None
        self.p: E = None
        self.t: D = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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