class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.t: C = None
        self.u: D = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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