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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

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

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