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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.s: B = None
        self.v: D = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.s: B = None
        self.v: D = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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