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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.u: D = None
        self.o: F = None
        self.t: G = None
        self.x: E = None
        self.z: H = None
        self.w: G = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.u: D = None
        self.o: F = None
        self.t: G = None
        self.x: E = None
        self.z: H = None
        self.w: G = None
        self.r: C = None
        self.txt = txt

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

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