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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.u: C = None
        self.t: H = None
        self.p: H = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.v: A = None
        self.q: F = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.u: C = None
        self.t: H = None
        self.p: H = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.v: A = None
        self.q: F = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

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

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