class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: I = None
        self.w: A = None
        self.p: H = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.r: H = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.w: G = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.o: H = None
        self.v: A = None
        self.r: D = None
        self.p: I = None
        self.w: D = None
        self.y: D = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.v: D = None
        self.u: D = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: I = None
        self.w: A = None
        self.p: H = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.r: H = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.w: G = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.o: H = None
        self.v: A = None
        self.r: D = None
        self.p: I = None
        self.w: D = None
        self.y: D = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.v: D = None
        self.u: D = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

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