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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.x: A = None
        self.w: I = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.x: A = None
        self.w: I = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

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