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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: G = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: G = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

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

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