class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

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

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