class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: J = None
        self.y: E = None
        self.x: C = None
        self.w: I = None
        self.r: F = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: J = None
        self.r: C = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: G = None
        self.p: D = None
        self.u: F = None
        self.v: F = None
        self.x: J = None
        self.s: I = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: J = None
        self.r: C = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: G = None
        self.p: D = None
        self.u: F = None
        self.v: F = None
        self.x: J = None
        self.s: I = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

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

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

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