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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: I = None
        self.q: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: I = None
        self.q: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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