class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.w: I = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.v: H = None
        self.z: A = None
        self.w: D = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.v: H = None
        self.z: A = None
        self.w: D = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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