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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.t: C = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

e.u = g
e.o = c
e.x = b
e.y = d
i.q = a
d.t = f
d.x = m
d.p = i
d.y = g
b.w = m
n.s = c
n.w = a
n.y = b
n.t = b
c.v = m
c.w = a
c.o = a
c.t = d
c.p = i
f.s = a
f.w = a
f.y = m
f.t = b
m.w = b
a.v = b
a.w = c
a.o = c
a.t = d
a.p = i
g.s = a
g.w = a
g.y = m
g.t = m
assert e.x.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: F = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.t: C = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

e.u = g
e.o = c
e.x = b
e.y = d
i.q = a
d.t = f
d.x = m
d.p = i
d.y = g
b.w = m
n.s = c
n.w = a
n.y = b
n.t = b
c.v = m
c.w = a
c.o = a
c.t = d
c.p = i
f.s = a
f.w = a
f.y = m
f.t = b
m.w = b
a.v = b
a.w = c
a.o = c
a.t = d
a.p = i
g.s = a
g.w = a
g.y = m
g.t = m
assert e.x.w.w.w.txt == "m"