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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.p: B = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: D = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

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

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

i.w = g
j.q = i
j.t = d
g.v = d
g.x = i
g.p = j
g.r = e
g.y = m
b.z = d
b.q = d
b.t = f
b.v = l
b.y = j
k.r = e
k.v = g
k.z = g
k.p = m
k.w = m
k.y = i
l.t = g
d.s = m
d.z = g
e.t = g
m.r = e
m.v = g
m.z = g
m.p = k
m.w = k
m.y = i
f.z = d
f.q = d
f.t = b
f.v = l
f.y = j
assert l.t.p.t.s.y.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.p: B = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: D = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

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

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

i.w = g
j.q = i
j.t = d
g.v = d
g.x = i
g.p = j
g.r = e
g.y = m
b.z = d
b.q = d
b.t = f
b.v = l
b.y = j
k.r = e
k.v = g
k.z = g
k.p = m
k.w = m
k.y = i
l.t = g
d.s = m
d.z = g
e.t = g
m.r = e
m.v = g
m.z = g
m.p = k
m.w = k
m.y = i
f.z = d
f.q = d
f.t = b
f.v = l
f.y = j
assert l.t.p.t.s.y.w.p.txt == "j"