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

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

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

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

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

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

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

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

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

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

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

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

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

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

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