class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.q: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: G = None
        self.y: C = None
        self.r: G = None
        self.z: J = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.p: I = None
        self.q: J = None
        self.v: G = None
        self.r: H = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: G = None
        self.y: C = None
        self.r: G = None
        self.z: J = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.p: I = None
        self.q: J = None
        self.v: G = None
        self.r: H = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: J = None
        self.txt = txt

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

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

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