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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.v: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.r: D = None
        self.x: D = None
        self.t: H = None
        self.z: D = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: H = None
        self.v: D = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.v: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.r: D = None
        self.x: D = None
        self.t: H = None
        self.z: D = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: H = None
        self.v: D = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.txt = txt

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

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