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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.u: A = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.v: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.o: E = None
        self.q: I = None
        self.v: C = None
        self.r: A = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.w: F = None
        self.y: F = None
        self.x: D = None
        self.v: E = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.x: F = None
        self.w: B = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.u: A = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.v: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.o: E = None
        self.q: I = None
        self.v: C = None
        self.r: A = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.w: F = None
        self.y: F = None
        self.x: D = None
        self.v: E = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.x: F = None
        self.w: B = None
        self.z: F = None
        self.txt = txt

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

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