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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.p: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.p: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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