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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.z: F = None
        self.x: B = None
        self.r: G = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.v: C = None
        self.q: B = None
        self.txt = txt

l = A("l")
h = B("h")
g = C("g")
k = D("k")
n = E("n")
f = F("f")
m = G("m")
d = F("d")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.z: F = None
        self.x: B = None
        self.r: G = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.v: C = None
        self.q: B = None
        self.txt = txt

l = A("l")
h = B("h")
g = C("g")
k = D("k")
n = E("n")
f = F("f")
m = G("m")
d = F("d")
i = C("i")

l.w = g
l.x = d
l.z = i
l.p = h
h.q = g
g.q = l
g.u = i
g.z = m
g.o = m
g.t = f
g.v = f
g.y = h
k.o = d
k.s = m
k.r = m
k.z = f
k.x = h
k.v = h
k.u = n
n.z = l
n.q = h
f.q = m
f.x = m
f.r = g
f.u = g
f.v = k
f.p = n
m.w = k
m.y = n
m.v = g
m.q = h
d.q = m
d.x = m
d.r = g
d.v = k
d.p = n
d.u = i
i.q = l
i.u = g
i.z = m
i.o = m
i.t = d
i.v = d
i.y = h
assert g.v.u.t.v.u.q.q.q.txt == "l"