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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: H = None
        self.q: I = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.r: I = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: H = None
        self.q: I = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.r: I = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

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

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

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