class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.q: F = None
        self.o: I = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: I = None
        self.q: G = None
        self.v: I = None
        self.z: H = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: F = None
        self.o: I = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: G = None
        self.y: I = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.v: B = None
        self.w: E = None
        self.o: G = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.q: F = None
        self.o: I = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: I = None
        self.q: G = None
        self.v: I = None
        self.z: H = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: F = None
        self.o: I = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: G = None
        self.y: I = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.v: B = None
        self.w: E = None
        self.o: G = None
        self.u: G = None
        self.txt = txt

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

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