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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

e = A("e")
h = B("h")
d = C("d")
a = D("a")
m = E("m")
j = F("j")
g = G("g")
i = B("i")
c = D("c")

e.z = h
h.z = j
h.s = j
h.p = d
h.u = g
h.r = g
h.o = m
h.v = c
d.p = j
d.w = m
d.o = c
a.x = g
m.p = g
j.u = d
j.y = g
g.x = j
g.u = j
g.v = c
i.z = j
i.s = j
i.p = d
i.u = g
i.r = g
i.o = m
i.v = c
c.x = g
assert m.p.u.u.w.p.v.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

e = A("e")
h = B("h")
d = C("d")
a = D("a")
m = E("m")
j = F("j")
g = G("g")
i = B("i")
c = D("c")

e.z = h
h.z = j
h.s = j
h.p = d
h.u = g
h.r = g
h.o = m
h.v = c
d.p = j
d.w = m
d.o = c
a.x = g
m.p = g
j.u = d
j.y = g
g.x = j
g.u = j
g.v = c
i.z = j
i.s = j
i.p = d
i.u = g
i.r = g
i.o = m
i.v = c
c.x = g
assert m.p.u.u.w.p.v.x.v.txt == "c"