class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.t: G = None
        self.z: B = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.p: G = None
        self.z: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.p: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.o: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

j.y = n
j.s = l
j.t = c
j.z = i
j.r = h
i.r = b
i.t = b
i.p = c
i.z = m
i.y = n
n.x = c
n.r = l
n.t = j
b.x = c
b.r = c
b.t = h
b.p = a
h.x = n
l.z = j
l.r = b
l.p = c
c.s = l
c.u = l
c.p = j
c.t = m
c.r = n
a.s = m
a.q = c
a.t = c
a.o = h
a.y = n
m.u = b
m.p = j
m.t = h
assert j.s.z.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.t: G = None
        self.z: B = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.p: G = None
        self.z: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.p: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.o: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

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