class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: E = None
        self.s: I = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: I = None
        self.s: A = None
        self.q: A = None
        self.t: I = None
        self.x: I = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: I = None
        self.w: E = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.q: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: H = None
        self.x: F = None
        self.r: B = None
        self.u: B = None
        self.v: B = None
        self.t: H = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: I = None
        self.s: A = None
        self.q: A = None
        self.t: I = None
        self.x: I = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: I = None
        self.w: E = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.q: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: H = None
        self.x: F = None
        self.r: B = None
        self.u: B = None
        self.v: B = None
        self.t: H = None
        self.o: B = None
        self.txt = txt

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

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