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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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