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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

m = A("m")
e = B("e")
k = C("k")
j = D("j")
b = E("b")
a = F("a")
l = G("l")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

m = A("m")
e = B("e")
k = C("k")
j = D("j")
b = E("b")
a = F("a")
l = G("l")

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