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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.t: B = None
        self.v: I = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.t: B = None
        self.v: I = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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