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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: J = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.s: D = None
        self.u: H = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: G = None
        self.v: E = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.s: G = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: J = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.s: D = None
        self.u: H = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: G = None
        self.v: E = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.s: G = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

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

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