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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: C = None
        self.v: E = None
        self.u: F = None
        self.t: G = None
        self.r: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

m = A("m")
b = B("b")
j = C("j")
i = D("i")
c = E("c")
f = F("f")
d = G("d")
l = A("l")
e = F("e")
a = E("a")

m.t = l
m.y = b
m.w = i
m.q = i
m.z = j
m.s = d
m.u = a
b.p = e
b.q = j
b.t = j
b.z = l
b.r = l
b.w = d
j.w = i
i.o = c
i.r = d
c.w = i
c.s = i
c.o = j
c.v = a
c.r = a
c.u = e
c.t = d
f.s = i
f.r = m
d.w = f
l.t = m
l.y = b
l.w = i
l.q = i
l.z = j
l.s = d
l.u = a
e.s = i
e.r = l
a.w = i
a.s = i
a.o = j
a.v = c
a.r = c
a.u = f
a.t = d
assert m.s.w.s.o.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.w: D = None
        self.z: C = None
        self.s: G = None
        self.q: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: C = None
        self.v: E = None
        self.u: F = None
        self.t: G = None
        self.r: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

m = A("m")
b = B("b")
j = C("j")
i = D("i")
c = E("c")
f = F("f")
d = G("d")
l = A("l")
e = F("e")
a = E("a")

m.t = l
m.y = b
m.w = i
m.q = i
m.z = j
m.s = d
m.u = a
b.p = e
b.q = j
b.t = j
b.z = l
b.r = l
b.w = d
j.w = i
i.o = c
i.r = d
c.w = i
c.s = i
c.o = j
c.v = a
c.r = a
c.u = e
c.t = d
f.s = i
f.r = m
d.w = f
l.t = m
l.y = b
l.w = i
l.q = i
l.z = j
l.s = d
l.u = a
e.s = i
e.r = l
a.w = i
a.s = i
a.o = j
a.v = c
a.r = c
a.u = f
a.t = d
assert m.s.w.s.o.u.r.txt == "l"