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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: D = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.t: C = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: D = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.t: C = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

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

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

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