class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.s: G = None
        self.o: H = None
        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.v: G = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.v: A = None
        self.txt = txt

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

b.z = m
b.q = l
b.u = l
b.s = j
b.o = d
e.x = l
k.v = j
k.w = d
l.t = k
l.y = k
l.z = d
l.q = n
n.y = j
m.v = e
j.o = l
j.w = b
d.s = n
d.x = k
d.v = b
assert b.u.z.v.s.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.s: G = None
        self.o: H = None
        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.v: G = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.v: A = None
        self.txt = txt

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

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