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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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