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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

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