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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.q: D = None
        self.x: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

f = A("f")
m = B("m")
c = C("c")
h = D("h")
g = E("g")
j = F("j")
i = C("i")
n = F("n")
k = F("k")
e = A("e")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.q: D = None
        self.x: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

f = A("f")
m = B("m")
c = C("c")
h = D("h")
g = E("g")
j = F("j")
i = C("i")
n = F("n")
k = F("k")
e = A("e")

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