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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.w: E = None
        self.o: H = None
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.w: E = None
        self.o: H = None
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

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

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

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

j.s = l
j.q = a
j.o = g
j.v = g
k.v = c
g.v = j
g.x = b
g.w = b
g.o = a
g.t = l
f.v = k
f.r = k
b.r = g
b.z = j
b.o = c
b.w = a
b.v = i
c.x = l
c.r = f
c.o = g
c.z = k
i.y = a
i.u = b
a.q = b
l.v = k
l.r = k
assert b.z.q.q.v.txt == "i"