class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: H = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: H = None
        self.v: I = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.t: A = None
        self.o: F = None
        self.s: C = None
        self.q: I = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: A = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.p: D = None
        self.q: F = None
        self.w: A = None
        self.x: D = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: H = None
        self.v: I = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.t: A = None
        self.o: F = None
        self.s: C = None
        self.q: I = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: A = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.p: D = None
        self.q: F = None
        self.w: A = None
        self.x: D = None
        self.y: H = None
        self.txt = txt

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

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