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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: H = None
        self.o: D = None
        self.q: C = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: H = None
        self.o: D = None
        self.q: C = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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