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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.z: C = None
        self.r: I = None
        self.u: H = None
        self.v: D = None
        self.o: A = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.z: C = None
        self.r: I = None
        self.u: H = None
        self.v: D = None
        self.o: A = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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