class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: A = None
        self.u: F = None
        self.s: H = None
        self.z: F = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.r: D = None
        self.u: D = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

g = A("g")
i = B("i")
c = C("c")
l = D("l")
b = E("b")
j = F("j")
e = G("e")
n = H("n")
d = G("d")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: A = None
        self.u: F = None
        self.s: H = None
        self.z: F = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.r: D = None
        self.u: D = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

g = A("g")
i = B("i")
c = C("c")
l = D("l")
b = E("b")
j = F("j")
e = G("e")
n = H("n")
d = G("d")

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