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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.z: A = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.z: A = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

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