class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: F = None
        self.p: D = None
        self.r: H = None
        self.y: E = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.q: I = None
        self.t: J = None
        self.p: C = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: D = None
        self.s: C = None
        self.v: H = None
        self.r: J = None
        self.z: D = None
        self.q: J = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: C = None
        self.s: A = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: H = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

c = A("c")
l = B("l")
e = C("e")
j = D("j")
d = E("d")
a = F("a")
b = G("b")
f = H("f")
g = I("g")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.q: I = None
        self.t: J = None
        self.p: C = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: D = None
        self.s: C = None
        self.v: H = None
        self.r: J = None
        self.z: D = None
        self.q: J = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: C = None
        self.s: A = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: H = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

c = A("c")
l = B("l")
e = C("e")
j = D("j")
d = E("d")
a = F("a")
b = G("b")
f = H("f")
g = I("g")
i = J("i")

c.v = b
c.w = a
c.x = a
c.p = j
c.r = f
c.z = f
c.y = d
l.w = c
l.s = g
l.q = g
l.t = i
l.p = e
l.r = j
l.v = a
e.t = c
j.p = e
j.o = c
j.w = a
j.s = g
d.y = l
d.z = g
d.v = j
a.t = c
a.p = j
a.z = j
a.s = e
a.y = e
a.v = f
a.r = i
a.q = i
b.r = i
b.q = e
b.s = c
b.p = g
f.t = b
f.q = e
g.o = i
i.t = b
i.z = f
i.o = l
i.x = a
assert c.p.o.y.y.p.t.w.s.t.txt == "c"