class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: J = None
        self.w: G = None
        self.u: I = None
        self.r: J = None
        self.t: J = None
        self.o: J = None
        self.p: G = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.v: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.t: E = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.v: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.t: E = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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