class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.u: F = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

f.s = d
f.r = d
f.o = e
f.u = n
d.u = l
d.y = f
d.o = j
d.r = h
h.u = e
h.z = j
h.v = l
h.o = k
b.u = l
b.z = l
b.o = j
e.t = b
e.y = k
e.u = l
e.s = l
e.o = l
l.t = h
k.v = e
k.t = l
k.q = l
k.o = n
n.r = j
j.s = d
j.r = d
j.o = e
j.u = n
c.t = b
c.y = k
c.u = l
c.s = l
c.o = l
assert h.v.t.u.y.q.t.u.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.u: F = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

f.s = d
f.r = d
f.o = e
f.u = n
d.u = l
d.y = f
d.o = j
d.r = h
h.u = e
h.z = j
h.v = l
h.o = k
b.u = l
b.z = l
b.o = j
e.t = b
e.y = k
e.u = l
e.s = l
e.o = l
l.t = h
k.v = e
k.t = l
k.q = l
k.o = n
n.r = j
j.s = d
j.r = d
j.o = e
j.u = n
c.t = b
c.y = k
c.u = l
c.s = l
c.o = l
assert h.v.t.u.y.q.t.u.t.o.txt == "j"