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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: I = None
        self.x: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.y: C = None
        self.u: I = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.r: A = None
        self.y: I = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.r: A = None
        self.y: D = None
        self.t: I = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.w: A = None
        self.s: F = None
        self.t: C = None
        self.u: E = None
        self.q: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: I = None
        self.x: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.y: C = None
        self.u: I = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.r: A = None
        self.y: I = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.r: A = None
        self.y: D = None
        self.t: I = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.w: A = None
        self.s: F = None
        self.t: C = None
        self.u: E = None
        self.q: D = None
        self.r: C = None
        self.txt = txt

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

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