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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

g = A("g")
h = B("h")
j = C("j")
e = D("e")
n = E("n")
c = F("c")
f = G("f")
b = H("b")
a = B("a")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

g = A("g")
h = B("h")
j = C("j")
e = D("e")
n = E("n")
c = F("c")
f = G("f")
b = H("b")
a = B("a")

g.o = b
g.u = b
g.r = n
g.w = j
h.q = n
h.w = j
j.q = g
j.x = e
e.u = h
e.x = c
n.s = c
c.r = n
c.t = f
c.z = f
c.s = f
c.q = j
c.y = j
c.w = h
c.p = g
f.u = g
f.s = n
f.w = j
f.x = e
f.p = b
b.q = g
b.x = g
b.t = f
b.r = f
b.p = j
b.u = j
b.w = n
b.o = a
a.q = n
a.w = j
assert e.u.q.s.r.s.q.x.u.txt == "h"