class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: B = None
        self.w: B = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

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