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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: H = None
        self.y: B = None
        self.q: H = None
        self.s: B = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: H = None
        self.y: B = None
        self.q: H = None
        self.s: B = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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