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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: E = None
        self.t: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: E = None
        self.t: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

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