class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.x: E = None
        self.y: D = None
        self.v: D = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: D = None
        self.u: E = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: D = None
        self.u: E = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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