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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.v: B = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.v: B = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.txt = txt

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

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