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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: G = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.v: I = None
        self.s: B = None
        self.u: C = None
        self.t: H = None
        self.q: B = None
        self.o: H = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: G = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.v: I = None
        self.s: B = None
        self.u: C = None
        self.t: H = None
        self.q: B = None
        self.o: H = None
        self.x: C = None
        self.txt = txt

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

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