class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.z: F = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.z: F = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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