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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.t: D = None
        self.u: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.t: D = None
        self.u: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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