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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: H = None
        self.v: D = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.y: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: G = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: H = None
        self.v: D = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.y: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: G = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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