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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.v: H = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.u: F = None
        self.r: G = None
        self.z: C = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.v: H = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.u: F = None
        self.r: G = None
        self.z: C = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

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