class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: H = None
        self.t: E = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.z: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.z: G = None
        self.s: F = None
        self.txt = txt

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

c = A("c")
d = B("d")
k = C("k")
n = D("n")
l = E("l")
a = F("a")
h = G("h")
g = H("g")
j = I("j")

c.v = n
c.r = g
c.s = g
c.t = l
c.o = h
d.u = c
d.x = l
k.x = j
k.p = a
k.y = n
k.z = n
n.z = g
l.x = j
l.s = k
l.w = k
l.r = c
l.u = c
l.z = a
l.y = a
l.t = g
a.x = k
a.o = k
a.z = n
a.p = g
a.v = l
h.q = d
h.w = j
h.u = a
g.t = l
g.x = h
g.z = h
g.s = a
j.q = h
j.z = g
j.y = d
assert g.t.x.q.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: H = None
        self.t: E = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.z: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.z: G = None
        self.s: F = None
        self.txt = txt

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

c = A("c")
d = B("d")
k = C("k")
n = D("n")
l = E("l")
a = F("a")
h = G("h")
g = H("g")
j = I("j")

c.v = n
c.r = g
c.s = g
c.t = l
c.o = h
d.u = c
d.x = l
k.x = j
k.p = a
k.y = n
k.z = n
n.z = g
l.x = j
l.s = k
l.w = k
l.r = c
l.u = c
l.z = a
l.y = a
l.t = g
a.x = k
a.o = k
a.z = n
a.p = g
a.v = l
h.q = d
h.w = j
h.u = a
g.t = l
g.x = h
g.z = h
g.s = a
j.q = h
j.z = g
j.y = d
assert g.t.x.q.q.u.txt == "c"