class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.w: C = None
        self.y: I = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.w: C = None
        self.y: I = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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