class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.z: H = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.p: G = None
        self.o: H = None
        self.u: A = None
        self.x: I = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.q: H = None
        self.p: C = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: H = None
        self.s: G = None
        self.t: H = None
        self.r: G = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.p: G = None
        self.o: H = None
        self.u: A = None
        self.x: I = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.q: H = None
        self.p: C = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: H = None
        self.s: G = None
        self.t: H = None
        self.r: G = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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