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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.z: E = None
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.x: D = None
        self.u: F = None
        self.s: E = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.z: A = None
        self.p: H = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.w: F = None
        self.p: F = None
        self.s: B = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

i = A("i")
c = B("c")
m = C("m")
n = D("n")
b = E("b")
j = F("j")
k = G("k")
f = H("f")
e = I("e")
h = H("h")

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.z: E = None
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.x: D = None
        self.u: F = None
        self.s: E = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.z: A = None
        self.p: H = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.w: F = None
        self.p: F = None
        self.s: B = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

i = A("i")
c = B("c")
m = C("m")
n = D("n")
b = E("b")
j = F("j")
k = G("k")
f = H("f")
e = I("e")
h = H("h")

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