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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.o: F = None
        self.z: F = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

m = A("m")
l = B("l")
b = C("b")
k = D("k")
i = E("i")
a = F("a")

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.o: F = None
        self.z: F = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

m = A("m")
l = B("l")
b = C("b")
k = D("k")
i = E("i")
a = F("a")

m.r = l
m.w = k
l.u = a
l.w = a
l.t = b
l.y = k
l.x = k
l.s = i
b.x = a
b.o = a
b.z = a
b.s = a
b.r = l
b.v = l
k.o = i
k.r = b
k.p = m
i.v = l
i.q = l
i.w = a
i.y = m
a.y = i
a.z = i
a.t = k
a.q = b
assert a.t.o.q.txt == "l"