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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.p: G = None
        self.x: I = None
        self.s: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.p: G = None
        self.x: I = None
        self.s: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.txt = txt

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

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