class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.q: A = None
        self.x: I = None
        self.t: E = None
        self.z: C = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: I = None
        self.q: D = None
        self.t: I = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: F = None
        self.r: D = None
        self.u: D = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.q: A = None
        self.x: I = None
        self.t: E = None
        self.z: C = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: I = None
        self.q: D = None
        self.t: I = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: F = None
        self.r: D = None
        self.u: D = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

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

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