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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

k = A("k")
f = B("f")
e = C("e")
l = D("l")
g = E("g")
b = F("b")
a = G("a")
j = H("j")

k.s = j
k.q = e
k.v = f
f.r = j
e.v = f
e.q = a
l.v = a
g.u = l
b.p = k
b.y = k
b.t = e
b.s = e
b.r = e
b.u = a
b.o = j
a.p = k
a.r = f
j.t = l
j.o = b
j.v = a
j.q = f
j.w = g
assert b.p.q.q.p.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

k = A("k")
f = B("f")
e = C("e")
l = D("l")
g = E("g")
b = F("b")
a = G("a")
j = H("j")

k.s = j
k.q = e
k.v = f
f.r = j
e.v = f
e.q = a
l.v = a
g.u = l
b.p = k
b.y = k
b.t = e
b.s = e
b.r = e
b.u = a
b.o = j
a.p = k
a.r = f
j.t = l
j.o = b
j.v = a
j.q = f
j.w = g
assert b.p.q.q.p.v.r.txt == "j"