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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.u: F = None
        self.s: C = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.u: F = None
        self.s: C = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

e.u = d
e.p = d
e.r = l
e.s = l
e.q = h
c.w = e
c.u = h
d.w = l
d.t = l
d.o = g
d.p = c
n.v = l
n.q = g
n.u = g
n.s = d
n.w = d
n.y = c
l.q = g
l.s = g
l.t = g
l.x = e
l.r = d
g.o = l
g.x = l
g.y = e
g.r = e
g.u = h
h.o = d
h.u = e
h.z = e
h.x = e
h.r = l
assert l.s.x.r.t.r.t.x.txt == "e"