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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

g = A("g")
d = B("d")
c = C("c")
j = D("j")
k = E("k")
f = F("f")
m = G("m")
n = E("n")
l = D("l")
h = D("h")

g.v = m
g.z = f
g.o = j
d.z = n
d.s = n
d.u = g
d.w = m
c.s = g
c.w = g
c.y = g
j.o = f
j.u = h
j.z = n
k.u = d
k.o = d
k.v = d
k.t = m
k.q = n
k.p = n
f.t = g
f.r = g
m.q = d
m.u = g
m.o = j
n.u = d
n.o = d
n.v = d
n.t = m
n.q = k
n.p = k
l.o = f
l.u = j
l.z = n
h.o = f
h.u = j
h.z = k
assert j.u.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

g = A("g")
d = B("d")
c = C("c")
j = D("j")
k = E("k")
f = F("f")
m = G("m")
n = E("n")
l = D("l")
h = D("h")

g.v = m
g.z = f
g.o = j
d.z = n
d.s = n
d.u = g
d.w = m
c.s = g
c.w = g
c.y = g
j.o = f
j.u = h
j.z = n
k.u = d
k.o = d
k.v = d
k.t = m
k.q = n
k.p = n
f.t = g
f.r = g
m.q = d
m.u = g
m.o = j
n.u = d
n.o = d
n.v = d
n.t = m
n.q = k
n.p = k
l.o = f
l.u = j
l.z = n
h.o = f
h.u = j
h.z = k
assert j.u.z.v.txt == "d"