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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: A = None
        self.p: E = None
        self.y: F = None
        self.s: G = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: A = None
        self.p: E = None
        self.y: F = None
        self.s: G = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

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

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