class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.v: G = None
        self.z: H = None
        self.w: C = None
        self.x: D = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: I = None
        self.z: F = None
        self.q: F = None
        self.y: C = None
        self.s: E = None
        self.x: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.y: D = None
        self.x: G = None
        self.p: A = None
        self.t: H = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: B = None
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.u: C = None
        self.t: D = None
        self.o: C = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: I = None
        self.z: F = None
        self.q: F = None
        self.y: C = None
        self.s: E = None
        self.x: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.y: D = None
        self.x: G = None
        self.p: A = None
        self.t: H = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: B = None
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.u: C = None
        self.t: D = None
        self.o: C = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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