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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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