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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.w: D = None
        self.p: F = None
        self.v: D = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.w: D = None
        self.p: F = None
        self.v: D = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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