class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: C = None
        self.p: A = None
        self.w: A = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.y: F = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

f = A("f")
g = B("g")
l = C("l")
m = D("m")
j = E("j")
b = F("b")
n = G("n")
k = H("k")
a = E("a")
c = A("c")

f.q = m
f.z = l
f.p = c
f.w = c
f.u = b
g.u = k
l.u = b
l.y = b
l.r = b
l.t = a
l.x = a
m.v = k
m.w = n
j.r = m
b.r = l
b.p = l
n.w = b
n.s = k
n.x = f
n.o = a
n.u = m
k.x = n
k.t = n
k.v = n
k.y = m
k.r = f
a.r = m
c.q = m
c.z = l
c.p = f
c.w = f
c.u = b
assert l.y.p.x.r.w.s.y.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: C = None
        self.p: A = None
        self.w: A = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.y: F = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

f = A("f")
g = B("g")
l = C("l")
m = D("m")
j = E("j")
b = F("b")
n = G("n")
k = H("k")
a = E("a")
c = A("c")

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