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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: B = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.w: B = None
        self.z: H = None
        self.y: B = None
        self.r: F = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: C = None
        self.z: H = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.x: H = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

h = A("h")
a = B("a")
i = C("i")
d = D("d")
n = E("n")
g = F("g")
e = G("e")
j = H("j")
f = C("f")
l = B("l")

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: B = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.w: B = None
        self.z: H = None
        self.y: B = None
        self.r: F = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: C = None
        self.z: H = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.x: H = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

h = A("h")
a = B("a")
i = C("i")
d = D("d")
n = E("n")
g = F("g")
e = G("e")
j = H("j")
f = C("f")
l = B("l")

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