class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.w: B = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.z: E = None
        self.t: E = None
        self.q: A = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.z: E = None
        self.t: E = None
        self.q: A = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

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