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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.x: E = None
        self.o: G = None
        self.y: F = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.o: H = None
        self.q: A = None
        self.r: A = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.u: B = None
        self.q: D = None
        self.r: E = None
        self.w: H = None
        self.p: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.t: H = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.x: E = None
        self.o: G = None
        self.y: F = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.o: H = None
        self.q: A = None
        self.r: A = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.u: B = None
        self.q: D = None
        self.r: E = None
        self.w: H = None
        self.p: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.t: H = None
        self.u: F = None
        self.txt = txt

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

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

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