class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: I = None
        self.x: I = None
        self.q: I = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: F = None
        self.v: G = None
        self.y: A = None
        self.q: B = None
        self.s: G = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.s: I = None
        self.o: I = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: D = None
        self.s: B = None
        self.y: C = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.z: E = None
        self.y: H = None
        self.x: A = None
        self.w: F = None
        self.u: D = None
        self.s: A = 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.w: G = None
        self.txt = txt

d = A("d")
l = B("l")
e = C("e")
j = D("j")
m = E("m")
f = F("f")
c = G("c")
k = H("k")
i = I("i")

d.v = f
d.r = i
d.x = i
d.q = i
d.s = k
d.w = j
l.p = c
l.q = j
e.x = f
e.w = f
e.t = f
e.v = c
e.s = c
e.z = c
e.y = d
e.q = l
j.t = e
j.w = k
j.s = i
j.o = i
j.z = m
j.y = l
m.t = c
m.y = c
f.x = d
f.t = j
f.v = j
f.s = l
f.y = e
f.z = k
c.p = k
c.y = k
c.o = e
c.z = m
c.x = d
c.s = d
c.w = f
c.u = j
k.z = d
i.w = c
assert c.o.s.u.t.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: I = None
        self.x: I = None
        self.q: I = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: F = None
        self.v: G = None
        self.y: A = None
        self.q: B = None
        self.s: G = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.s: I = None
        self.o: I = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: D = None
        self.s: B = None
        self.y: C = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.z: E = None
        self.y: H = None
        self.x: A = None
        self.w: F = None
        self.u: D = None
        self.s: A = 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.w: G = None
        self.txt = txt

d = A("d")
l = B("l")
e = C("e")
j = D("j")
m = E("m")
f = F("f")
c = G("c")
k = H("k")
i = I("i")

d.v = f
d.r = i
d.x = i
d.q = i
d.s = k
d.w = j
l.p = c
l.q = j
e.x = f
e.w = f
e.t = f
e.v = c
e.s = c
e.z = c
e.y = d
e.q = l
j.t = e
j.w = k
j.s = i
j.o = i
j.z = m
j.y = l
m.t = c
m.y = c
f.x = d
f.t = j
f.v = j
f.s = l
f.y = e
f.z = k
c.p = k
c.y = k
c.o = e
c.z = m
c.x = d
c.s = d
c.w = f
c.u = j
k.z = d
i.w = c
assert c.o.s.u.t.q.p.txt == "c"