class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.t: G = None
        self.s: H = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: H = None
        self.q: C = None
        self.o: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
k = C("k")
b = D("b")
j = E("j")
m = F("m")
g = G("g")
n = H("n")

e.u = n
a.x = g
a.y = e
a.u = n
k.u = m
k.x = b
k.t = g
k.o = g
k.s = n
k.r = a
b.r = e
b.u = n
b.w = n
b.o = n
b.q = k
b.x = a
j.r = m
j.x = m
j.t = m
j.p = m
m.z = k
m.s = e
g.p = a
g.z = a
g.t = e
g.v = e
g.u = n
g.q = j
g.w = k
g.o = b
n.r = b
n.o = b
n.p = b
n.w = b
n.q = g
n.z = a
assert e.u.p.x.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.t: G = None
        self.s: H = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: H = None
        self.q: C = None
        self.o: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
k = C("k")
b = D("b")
j = E("j")
m = F("m")
g = G("g")
n = H("n")

e.u = n
a.x = g
a.y = e
a.u = n
k.u = m
k.x = b
k.t = g
k.o = g
k.s = n
k.r = a
b.r = e
b.u = n
b.w = n
b.o = n
b.q = k
b.x = a
j.r = m
j.x = m
j.t = m
j.p = m
m.z = k
m.s = e
g.p = a
g.z = a
g.t = e
g.v = e
g.u = n
g.q = j
g.w = k
g.o = b
n.r = b
n.o = b
n.p = b
n.w = b
n.q = g
n.z = a
assert e.u.p.x.u.p.txt == "b"