class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.o: C = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.o: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.o: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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