class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: H = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.z: G = None
        self.s: I = None
        self.t: E = None
        self.y: G = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.w: B = None
        self.p: A = None
        self.s: I = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.z: G = None
        self.s: I = None
        self.t: E = None
        self.y: G = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.w: B = None
        self.p: A = None
        self.s: I = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.v: E = None
        self.txt = txt

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

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