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

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

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

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

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

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

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

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

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

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

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

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

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

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

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