class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: J = None
        self.t: D = None
        self.x: E = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.w: C = None
        self.q: I = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: G = None
        self.r: B = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.w: C = None
        self.q: I = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: G = None
        self.r: B = None
        self.x: J = None
        self.txt = txt

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

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

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