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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.u: G = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.u: G = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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