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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: H = None
        self.x: F = None
        self.t: A = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.q: C = None
        self.w: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: C = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

g = A("g")
m = B("m")
f = C("f")
a = D("a")
j = E("j")
c = F("c")
i = G("i")
n = H("n")
e = B("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: H = None
        self.x: F = None
        self.t: A = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.q: C = None
        self.w: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: C = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

g = A("g")
m = B("m")
f = C("f")
a = D("a")
j = E("j")
c = F("c")
i = G("i")
n = H("n")
e = B("e")

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