class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.s: G = None
        self.w: E = None
        self.q: G = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.u: A = None
        self.o: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.p: D = None
        self.y: A = None
        self.o: G = None
        self.z: D = None
        self.x: F = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
g = C("g")
f = D("f")
c = E("c")
l = F("l")
k = G("k")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.u: A = None
        self.o: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.p: D = None
        self.y: A = None
        self.o: G = None
        self.z: D = None
        self.x: F = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
g = C("g")
f = D("f")
c = E("c")
l = F("l")
k = G("k")
n = H("n")

d.x = f
d.v = l
d.s = k
d.q = k
d.r = k
d.o = k
d.w = c
a.t = f
a.q = k
a.u = d
a.o = d
a.y = l
g.r = l
f.q = n
f.p = n
c.r = a
c.u = n
c.p = f
c.z = f
c.y = d
c.o = k
c.x = l
l.o = d
k.t = l
n.v = c
assert f.q.v.x.o.v.o.w.txt == "c"