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

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

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

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

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

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

b = A("b")
n = B("n")
a = C("a")
d = D("d")
h = E("h")
k = F("k")
m = A("m")
l = F("l")
j = C("j")
c = A("c")

b.y = d
b.t = d
b.w = k
b.r = l
b.u = n
n.q = c
n.p = m
n.o = d
a.p = h
a.v = j
d.q = h
h.z = k
k.z = n
k.u = n
k.x = n
k.t = j
k.o = m
k.y = b
m.y = d
m.t = d
m.w = l
m.r = k
m.u = n
l.z = n
l.u = n
l.x = n
l.t = j
l.o = m
l.y = m
j.p = h
j.v = a
c.y = d
c.t = d
c.w = l
c.r = k
c.u = n
assert n.q.t.q.z.y.u.p.u.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.w: F = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

b = A("b")
n = B("n")
a = C("a")
d = D("d")
h = E("h")
k = F("k")
m = A("m")
l = F("l")
j = C("j")
c = A("c")

b.y = d
b.t = d
b.w = k
b.r = l
b.u = n
n.q = c
n.p = m
n.o = d
a.p = h
a.v = j
d.q = h
h.z = k
k.z = n
k.u = n
k.x = n
k.t = j
k.o = m
k.y = b
m.y = d
m.t = d
m.w = l
m.r = k
m.u = n
l.z = n
l.u = n
l.x = n
l.t = j
l.o = m
l.y = m
j.p = h
j.v = a
c.y = d
c.t = d
c.w = l
c.r = k
c.u = n
assert n.q.t.q.z.y.u.p.u.q.u.txt == "n"