class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

k = A("k")
g = B("g")
l = C("l")
i = D("i")
b = E("b")
e = F("e")
c = G("c")
d = H("d")

k.q = e
g.v = k
l.u = e
l.v = e
l.s = g
l.t = b
l.p = i
i.x = e
i.u = e
i.o = d
i.p = b
b.u = c
b.o = l
e.z = k
c.q = l
c.t = l
c.r = l
c.x = l
c.w = d
c.s = i
d.t = e
d.q = c
assert b.o.s.v.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

k = A("k")
g = B("g")
l = C("l")
i = D("i")
b = E("b")
e = F("e")
c = G("c")
d = H("d")

k.q = e
g.v = k
l.u = e
l.v = e
l.s = g
l.t = b
l.p = i
i.x = e
i.u = e
i.o = d
i.p = b
b.u = c
b.o = l
e.z = k
c.q = l
c.t = l
c.r = l
c.x = l
c.w = d
c.s = i
d.t = e
d.q = c
assert b.o.s.v.q.z.txt == "k"