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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: I = None
        self.u: G = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: I = None
        self.u: G = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.txt = txt

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

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