class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.r: I = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.r: I = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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

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