class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.z: H = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

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