class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.x: E = None
        self.u: J = None
        self.y: F = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: J = None
        self.w: E = None
        self.t: E = None
        self.s: D = None
        self.x: G = None
        self.o: E = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: I = None
        self.o: F = None
        self.z: J = None
        self.r: A = None
        self.s: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: H = None
        self.y: A = None
        self.z: D = None
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

c = A("c")
n = B("n")
b = C("b")
f = D("f")
m = E("m")
i = F("i")
d = G("d")
e = H("e")
l = I("l")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: J = None
        self.w: E = None
        self.t: E = None
        self.s: D = None
        self.x: G = None
        self.o: E = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: I = None
        self.o: F = None
        self.z: J = None
        self.r: A = None
        self.s: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: H = None
        self.y: A = None
        self.z: D = None
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

c = A("c")
n = B("n")
b = C("b")
f = D("f")
m = E("m")
i = F("i")
d = G("d")
e = H("e")
l = I("l")
h = J("h")

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