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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

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

g.v = d
g.r = k
n.p = i
l.s = k
l.p = m
l.x = i
i.v = g
j.x = i
j.q = i
j.s = a
j.v = m
j.o = l
j.p = n
j.y = d
k.t = l
k.s = n
k.w = i
h.u = i
h.s = i
h.y = n
h.t = k
d.u = i
d.s = i
d.y = m
d.t = k
a.s = k
a.p = m
a.x = i
m.p = i
assert d.s.v.v.txt == "d"