class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.t: F = None
        self.x: F = None
        self.p: E = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: G = None
        self.x: F = None
        self.y: F = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: G = None
        self.x: F = None
        self.y: F = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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