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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.y: D = None
        self.u: D = None
        self.v: F = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

l = A("l")
m = B("m")
f = C("f")
i = D("i")
g = E("g")
h = F("h")
b = G("b")
n = C("n")
j = D("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.y: D = None
        self.u: D = None
        self.v: F = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

l = A("l")
m = B("m")
f = C("f")
i = D("i")
g = E("g")
h = F("h")
b = G("b")
n = C("n")
j = D("j")

l.p = m
l.v = b
m.q = j
m.o = j
m.u = h
m.p = n
m.s = l
f.t = b
f.r = m
f.y = m
f.z = j
f.v = g
f.q = h
f.u = l
i.x = b
i.q = h
i.v = h
i.y = j
i.u = j
i.o = n
i.t = g
g.x = i
g.z = l
h.x = g
h.o = n
h.p = l
b.p = g
b.t = m
b.s = i
n.t = b
n.r = m
n.y = m
n.z = j
n.v = g
n.q = h
n.u = l
j.x = b
j.q = h
j.v = h
j.y = i
j.u = i
j.o = n
j.t = g
assert n.z.q.p.v.txt == "b"