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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.p: H = None
        self.r: H = None
        self.o: C = None
        self.s: H = None
        self.u: A = None
        self.q: G = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.o: A = None
        self.w: D = None
        self.x: I = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: H = None
        self.s: I = None
        self.p: B = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.r: I = None
        self.o: A = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.p: H = None
        self.r: H = None
        self.o: C = None
        self.s: H = None
        self.u: A = None
        self.q: G = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.o: A = None
        self.w: D = None
        self.x: I = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: H = None
        self.s: I = None
        self.p: B = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.r: I = None
        self.o: A = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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