class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: I = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.x: A = None
        self.o: C = None
        self.z: E = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.y: B = None
        self.v: A = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.w: G = None
        self.q: D = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.p: D = None
        self.w: A = None
        self.y: E = None
        self.z: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.z: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: H = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.x: A = None
        self.o: C = None
        self.z: E = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.y: B = None
        self.v: A = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.w: G = None
        self.q: D = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.p: D = None
        self.w: A = None
        self.y: E = None
        self.z: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.z: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: H = None
        self.r: H = None
        self.txt = txt

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

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