class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.o: A = None
        self.q: F = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.t: I = None
        self.s: B = None
        self.y: I = None
        self.w: I = None
        self.r: I = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.u: C = None
        self.y: E = None
        self.p: C = None
        self.z: D = None
        self.o: D = None
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.o: A = None
        self.q: F = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.t: I = None
        self.s: B = None
        self.y: I = None
        self.w: I = None
        self.r: I = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.u: C = None
        self.y: E = None
        self.p: C = None
        self.z: D = None
        self.o: D = None
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

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

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