class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.r: D = None
        self.s: E = None
        self.w: E = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.r: H = None
        self.t: D = None
        self.p: H = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.p: A = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.q: D = None
        self.w: B = None
        self.o: A = None
        self.z: D = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: B = None
        self.p: G = None
        self.z: F = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.r: H = None
        self.t: D = None
        self.p: H = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.p: A = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.q: D = None
        self.w: B = None
        self.o: A = None
        self.z: D = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: B = None
        self.p: G = None
        self.z: F = None
        self.x: C = None
        self.txt = txt

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

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