class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.t: F = None
        self.v: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: G = None
        self.q: E = None
        self.s: G = None
        self.o: D = None
        self.r: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

j = A("j")
g = B("g")
d = C("d")
h = D("h")
b = E("b")
c = F("c")
k = G("k")
f = H("f")
n = I("n")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: G = None
        self.q: E = None
        self.s: G = None
        self.o: D = None
        self.r: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

j = A("j")
g = B("g")
d = C("d")
h = D("h")
b = E("b")
c = F("c")
k = G("k")
f = H("f")
n = I("n")

j.p = g
j.s = c
j.t = c
j.v = b
j.y = h
g.y = b
g.q = b
g.w = b
g.p = k
g.s = k
g.o = h
g.r = h
g.u = j
d.r = c
d.u = b
d.t = b
d.w = g
d.x = k
d.o = n
d.z = j
h.w = d
b.p = n
b.w = g
b.r = g
b.s = j
b.t = j
b.x = j
b.u = f
b.q = f
c.r = f
c.v = b
c.y = b
k.v = j
f.o = k
f.r = n
n.s = h
n.u = h
n.z = b
assert g.q.s.p.w.s.s.y.s.txt == "j"