class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: F = None
        self.x: D = None
        self.t: E = None
        self.q: H = None
        self.u: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: D = None
        self.r: I = None
        self.w: F = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: D = None
        self.r: I = None
        self.w: F = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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