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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.o: A = None
        self.t: A = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.q: C = None
        self.w: E = None
        self.z: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.t: G = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.o: A = None
        self.t: A = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.q: C = None
        self.w: E = None
        self.z: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.t: G = None
        self.w: C = None
        self.txt = txt

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

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