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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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