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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

a = A("a")
d = B("d")
l = C("l")
i = D("i")
h = E("h")
f = F("f")
m = G("m")
e = E("e")

a.u = m
a.p = m
a.z = m
a.x = e
a.t = i
a.q = i
a.o = d
d.x = m
d.s = m
d.o = m
d.y = a
d.w = i
l.y = f
l.r = i
i.x = f
i.s = f
i.t = m
h.q = f
h.u = e
h.y = i
h.w = i
h.r = l
h.x = l
h.p = m
f.v = i
f.y = l
f.x = d
m.q = l
m.p = h
m.u = f
m.r = d
e.q = f
e.u = h
e.y = i
e.w = i
e.r = l
e.x = l
e.p = m
assert d.y.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: G = None
        self.x: E = None
        self.t: D = None
        self.o: B = None
        self.z: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

a = A("a")
d = B("d")
l = C("l")
i = D("i")
h = E("h")
f = F("f")
m = G("m")
e = E("e")

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