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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: E = None
        self.txt = txt

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

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