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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.p: G = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.u: A = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.v: F = None
        self.t: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.t: F = None
        self.y: C = None
        self.p: F = None
        self.q: F = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.p: G = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.u: A = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.v: F = None
        self.t: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.t: F = None
        self.y: C = None
        self.p: F = None
        self.q: F = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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