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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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