class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.u: D = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.q: F = None
        self.r: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.p: B = None
        self.x: C = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.u: F = None
        self.txt = txt

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

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

k.y = b
k.z = b
k.o = b
k.r = b
k.u = e
b.p = k
b.u = f
b.q = m
b.r = e
b.z = e
i.z = b
i.p = b
i.y = m
i.w = m
i.x = j
i.u = l
e.t = b
f.x = m
f.u = m
f.r = k
m.z = e
l.x = m
l.u = m
l.r = k
j.z = b
j.p = b
j.y = m
j.w = m
j.x = i
j.u = l
assert j.z.q.z.t.u.r.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.u: D = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.q: F = None
        self.r: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.p: B = None
        self.x: C = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.u: F = None
        self.txt = txt

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

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

k.y = b
k.z = b
k.o = b
k.r = b
k.u = e
b.p = k
b.u = f
b.q = m
b.r = e
b.z = e
i.z = b
i.p = b
i.y = m
i.w = m
i.x = j
i.u = l
e.t = b
f.x = m
f.u = m
f.r = k
m.z = e
l.x = m
l.u = m
l.r = k
j.z = b
j.p = b
j.y = m
j.w = m
j.x = i
j.u = l
assert j.z.q.z.t.u.r.o.p.txt == "k"