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

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

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

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

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

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

k = A("k")
g = B("g")
b = C("b")
n = D("n")
j = E("j")
a = F("a")
e = E("e")
c = F("c")
l = A("l")

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

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

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

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

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

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

k = A("k")
g = B("g")
b = C("b")
n = D("n")
j = E("j")
a = F("a")
e = E("e")
c = F("c")
l = A("l")

k.s = j
k.x = g
k.t = c
k.v = b
k.r = n
g.x = n
g.v = b
b.o = g
b.u = g
b.t = g
b.s = n
b.v = n
b.q = k
n.o = j
j.o = n
a.o = k
a.y = n
a.w = c
a.z = c
e.o = n
c.o = l
c.y = n
c.w = a
c.z = a
l.s = e
l.x = g
l.t = a
l.v = b
l.r = n
assert k.s.o.o.o.o.o.txt == "n"