class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: G = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: F = None
        self.t: D = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

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

n = A("n")
i = B("i")
c = C("c")
a = D("a")
d = E("d")
m = F("m")
j = G("j")
b = H("b")
k = I("k")

n.p = k
n.z = k
i.x = k
i.q = k
i.s = a
i.t = d
i.p = b
i.r = b
i.z = c
c.x = k
c.z = d
c.s = d
a.q = b
d.x = a
d.s = j
d.v = i
d.z = n
m.o = c
j.x = b
j.s = n
b.q = j
b.z = m
b.u = m
b.t = a
b.o = a
k.z = c
k.v = d
k.q = d
k.r = b
k.y = a
k.u = i
assert c.s.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: G = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: F = None
        self.t: D = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

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

n = A("n")
i = B("i")
c = C("c")
a = D("a")
d = E("d")
m = F("m")
j = G("j")
b = H("b")
k = I("k")

n.p = k
n.z = k
i.x = k
i.q = k
i.s = a
i.t = d
i.p = b
i.r = b
i.z = c
c.x = k
c.z = d
c.s = d
a.q = b
d.x = a
d.s = j
d.v = i
d.z = n
m.o = c
j.x = b
j.s = n
b.q = j
b.z = m
b.u = m
b.t = a
b.o = a
k.z = c
k.v = d
k.q = d
k.r = b
k.y = a
k.u = i
assert c.s.v.t.txt == "d"