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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: F = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: J = None
        self.p: B = None
        self.u: B = None
        self.s: D = None
        self.v: H = None
        self.z: J = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: B = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: F = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: J = None
        self.p: B = None
        self.u: B = None
        self.s: D = None
        self.v: H = None
        self.z: J = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: B = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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