class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.w: E = None
        self.o: B = None
        self.z: A = None
        self.txt = txt

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

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

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

g = A("g")
c = B("c")
h = C("h")
d = D("d")
i = E("i")
b = F("b")
k = G("k")
l = E("l")

g.p = c
g.v = h
c.y = d
c.z = k
h.q = l
h.y = l
h.v = l
h.s = b
h.w = b
h.p = k
h.o = k
d.u = i
d.q = g
d.z = g
d.w = l
d.o = c
i.s = b
i.z = g
i.o = d
i.w = c
i.t = c
b.u = g
b.w = c
b.t = k
b.v = k
b.x = h
k.z = c
k.t = b
k.v = d
k.q = h
l.s = b
l.z = g
l.o = d
l.w = c
l.t = c
assert l.o.z.v.o.t.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.w: E = None
        self.o: B = None
        self.z: A = None
        self.txt = txt

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

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

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

g = A("g")
c = B("c")
h = C("h")
d = D("d")
i = E("i")
b = F("b")
k = G("k")
l = E("l")

g.p = c
g.v = h
c.y = d
c.z = k
h.q = l
h.y = l
h.v = l
h.s = b
h.w = b
h.p = k
h.o = k
d.u = i
d.q = g
d.z = g
d.w = l
d.o = c
i.s = b
i.z = g
i.o = d
i.w = c
i.t = c
b.u = g
b.w = c
b.t = k
b.v = k
b.x = h
k.z = c
k.t = b
k.v = d
k.q = h
l.s = b
l.z = g
l.o = d
l.w = c
l.t = c
assert l.o.z.v.o.t.v.q.txt == "h"