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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.o: C = None
        self.z: H = None
        self.w: D = None
        self.q: G = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.o: I = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.s: B = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.u: E = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.o: C = None
        self.z: H = None
        self.w: D = None
        self.q: G = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.o: I = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.s: B = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.u: E = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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

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