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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: H = None
        self.v: B = None
        self.o: E = None
        self.q: G = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.t: F = None
        self.w: F = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.t: B = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: H = None
        self.v: B = None
        self.o: E = None
        self.q: G = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.t: F = None
        self.w: F = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.t: B = None
        self.p: E = None
        self.txt = txt

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

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