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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: G = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: G = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

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