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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.t: D = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.w: I = None
        self.o: I = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.r: C = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.t: D = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.w: I = None
        self.o: I = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.r: C = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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