class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: J = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.s: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.t: C = None
        self.z: F = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.s: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.t: C = None
        self.z: F = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

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

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

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